package plantsversuszombies;

import phonegame.*;

public class PlantsVersusZombies extends GameEngine {
	
	private Player player;
	private GameDashboard db;
	
	public PlantsVersusZombies() {
		super();
		super.setBackgroundColor(255, 255, 255);
		super.setBounds(0, -50, 250, 250);
		this.buildEnvironment();
		
		this.player = new Player(this);
		super.addPlayer(this.player);
		super.addGameItem(new Zombie(0));
		
		db = new GameDashboard();
		db.setBackgroundColor(255, 0, 0);
		db.setSize(100, 16);
		db.addItem("Size", "" + super.getScreenHeight() + " : " + super.getScreenWidth());
		super.addGameDashboard(db);
		
		super.startGame();
	}
	
	public void buildEnvironment() {
		String[] imagePaths = {
				"/images/grass.png",
		};
		
		byte[][] map = {
			{1,1,1,1,1},
			{1,1,1,1,1},
			{1,1,1,1,1},
			{1,1,1,1,1},
			{1,1,1,1,1},
		};
		
		super.setTileImages(imagePaths, 40, 40);
		super.addEnvironmentMap(map, 0, 0);
	}
}
